home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12008 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  950 b 

  1. Path: noc.netcom.net!news
  2. From: Tarang Deshpande <tarang@willows.com>
  3. Newsgroups: comp.lang.c,comp.unix.programmer,comp.unix.questions
  4. Subject: Re: Correct usage of system call?
  5. Date: Wed, 27 Mar 1996 18:35:01 -0800
  6. Organization: NETCOM Network Operations
  7. Message-ID: <3159FAD5.5EB7@willows.com>
  8. References: <4jb03v$oi6@news.tamu.edu>
  9. NNTP-Posting-Host: daffy.willows.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
  14.  
  15. Justin Ray Mcelhanon wrote:
  16. > It works great, however, I'd like to add in a command to allow one to
  17. > type in the site name.  Example, when you call up the ftp case it does
  18. > a scanf(%s,site); (with site declared as an char string) anyway I then
  19. > want to take that and put it in the system command. ie system("ftp site"),
  20.  
  21. try:
  22.  
  23.     sprintf ( Command, "pine %s", site );
  24.     system ( Command );
  25.  
  26. where Command is a string that is large enough.
  27.